package com.itheima.泛型.泛型接口;

import java.util.ArrayList;
import java.util.Arrays;

public class GenericityInterface {
    public static void main(String[] args) {
        method(new ArrayList<String>());
        method(new ArrayList<Integer>());
    method1(new ArrayList<Integer>());
     method1(new ArrayList<Number>());
        method2(new ArrayList<Number>());
        method2(new ArrayList<Object>());


    }

    public static void method(ArrayList<?> list){
        System.out.println(list);
    }

    private static void method1(ArrayList<?extends Number>list) {
        System.out.println(list);
    }

    private static void method2(ArrayList<?super Number>list) {
        System.out.println(list);
    }

}
